part of 'header.dart';

class OrderStateView extends StatelessWidget {
  OrderStateView({Key? key}) : super(key: key);
  final MeController controller = Get.find<MeController>();
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.fromLTRB(gap12, gap10, gap12, gap10),
      padding: EdgeInsets.fromLTRB(gap12, gap10, gap12, gap20),
      width: Get.width - 2 * gap12,
      decoration: BoxDecoration(
          color: ColorsUtil.white,
          borderRadius: BorderRadius.circular(circle4)),
      child: Column(
        children: [
          TitleContentItemView(
            title: '我的订单',
            content: '查看全部',
            onTap: controller.tapLookAll,
          ),
          SizedBox(
            height: gap10,
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: controller.state.orderStateList
                .map((e) => MenuItemView(
                      icon: RedContainer(
                        childSize: 25.w,
                        redCount: 2,
                        child: loadImage(
                            url: e.url!.imgPathMe,
                            width: 25.w,
                            height: 25.w,
                            fit: BoxFit.contain),
                      ),
                      title: Text(
                        e.name,
                        style: pfSCStyle(
                            color: ColorsUtil.title, fontSize: font14),
                      ),
                      onTap: e.onTap,
                    ))
                .toList(),
          )
        ],
      ),
    );
  }
}
